Repository navigation
[DTLS 1.3] Reject updated Client Hello with unsolicited key share modification - #6127
Merged
Conversation
Co-Authored-By: Amos Treiber <amos.treiber@rohde-schwarz.com>
If we, as the server, sent a HelloRetryRequest that does not contain a key_share extension (i.e. we don't want the client to modify their choice of key agreement algorithm) we must not accept the content of the key_share extension to change in the second ClientHello. At the moment we will send HelloRetryRequest _only if_ we do want the client's key_share to change. So this code is currently never accessed. However, with DTLS 1.3 we might send HelloRetryRequest _only_ for the cookie-based return routability check and without requesting another key agreement algorithm. Co-Authored-By: Amos Treiber <amos.treiber@rohde-schwarz.com>
Open
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
If we, as the server, sent a HelloRetryRequest that does not contain a key_share extension (i.e. we don't want the client to modify their choice of key agreement algorithm) we must not accept the content of the key_share extension to change in the second ClientHello.
At the moment we will send HelloRetryRequest only if we do want the client's key_share to change. So this code is currently never accessed. However, with DTLS 1.3 we might send HelloRetryRequest only for the cookie-based return routability check and without requesting another key agreement algorithm.
This is a fix for the Copilot finding over here: #6062 (comment)
A regression test is added here: randombit/plzn#1